package com.csx.saas.platform.init.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;

/**
 * <p>
 * 实体类
 * 产品分类
 * </p>
 *
 * @author ChenSongXin
 * @since 2021-03-03
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = false)
@Builder
@ApiModel(value = "InitProductCateSaveDTO", description = "产品分类")
public class InitProductCateSaveDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 产品分类图(100*100)
     */
    @ApiModelProperty(value = "产品分类图(100*100)")
    @Length(max = 255, message = "产品分类图(100*100)长度不能超过255")
    private String imgUrl;

    @ApiModelProperty(value = "名称")
    @NotEmpty(message = "名称不能为空")
    @Length(max = 255, message = "名称长度不能超过255")
    protected String label;

    @ApiModelProperty(value = "父ID")
    protected Long parentId;

    @ApiModelProperty(value = "排序号")
    protected Integer sortValue;

    @ApiModelProperty(value = "产品分类上级名称")
    private String parentName;
}
